package red.cola.auth.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import red.cola.auth.service.SysUserService;
import red.cola.model.system.SysUser;
import red.cola.result.Result;

import javax.annotation.Resource;


/**
 * @Name: SysUserController
 * @Author: Cola
 * @Time: 2023/3/5 14:00
 * @Description: SysUserController
 */
@Api(tags = "用户管理接口")
@RestController
@RequestMapping("/admin/system/sysUser")
public class SysUserController {

    @Resource
    private SysUserService userService;


    @ApiOperation(value = "获取用户")
    @GetMapping("get/{id}")
    public Result get(@PathVariable Long id) {
        SysUser user = userService.getById(id);
        return Result.ok(user);
    }

    @ApiOperation(value = "RH")
    @GetMapping("helloRH")
    public String helloRH() {

        return "Hello，RH！";
    }

}


